<?php

class CampController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
          //	$this->_helper->layout->setLayout('layout');
		Zend_Loader::loadFile("../application/default/models/Aboutcountry.php");
                $request = $this->getRequest();
                $id = $request->getParam('id', 0);
		$model_aboutcountry = new Aboutcountry();
                $campaigndetails=$model_aboutcountry->getCampaignDetails($id);
                $this->view->campaigndetails = $campaigndetails;
                $national_park_details=$model_aboutcountry->getPageDetailsByCategory($campaigndetails["nationalpark"]);
                $this->view->national_park_details = $national_park_details;
    }

    public function viewAction()
    {
        Zend_Loader::loadFile("../application/default/models/Aboutcountry.php");
        $breadcrumb= Array ("0" =>Array("title" => "Home", "url" => "/index/" ), "1"=>Array("title"=>"Camping", "url"=>"") );
        $request = $this->getRequest();      
        $id = $request->getParam("id");
        $model_aboutcountry = new Aboutcountry();
        $campaigndetails=$model_aboutcountry->getCampaignDetails($id);
        $this->view->campaigndetails = $campaigndetails;      
        $national_park_details=$model_aboutcountry->getPageDetailsByCategory($campaigndetails["nationalpark"]);
        $this->view->national_park_details = $national_park_details;
        $sess = new Zend_Session_Namespace('locale');
        $curr_lang = $sess->current_lang;
        if($curr_lang != '')
        {
            $lang = $curr_lang;
        } else {
            $lang = 'en';
            }

            $this->view->lang = $lang;
        $this->view->breadcrumb()->set($breadcrumb);
    }
}